/**
 * label为表单的label
 * type为表单类型： 1 text  2 单选框  3 复选框  4 textarea
 */

export const studentInfoMaps = {
	name: {
		label: '姓名',
		default: '',
		type: 1
	},
	age: {
		label: '年龄',
		default: 0,
		type: 1
	},
	sex: {
		label: '性别',
		default: 1,  // 1 男 0 女
		type: 2,
		options: [
			{
				label: '男',
				value: 1
			},
			{
				label: '女',
				value: 0
			}
		]
	},
	mobile: {
		label: '家庭联系电话',
		default: '',
		type: 1
	},
	address: {
		label: '联系地址',
		default: '',
		type: 1
	},
	qq: {
		label: 'QQ号',
		default: '',
		type: 1
	},
	wechat: {
		label: '微信号',
		default: '',
		type: 1
	},
	remark: {
		label: '备注',
		default: '',
		type: 4
	}
};

export const rules = {
	name: [
	  { required: true, message: '请输入学生姓名', trigger: 'blur' },
	  { min: 2, max: 5, message: '长度在 2 到 5 个字符', trigger: 'blur' }
	],
	age: [
	  { required: true, message: '请填写年龄', trigger: 'change' }
	]
};
